// import request from 'umi-request';
import request from '@/utils/request';
import { TableListParams, FormItem } from './data.d';

//查询出口信用险
export async function fetch(params: TableListParams) {
  return request(PORTAL_PATH + '/api/qianzhuang/insurancepolicys', {
    params,
  });
}

//查询出口信用险
export async function add(params: FormItem) {
  return request(PORTAL_PATH + '/api/insurancepolicy', {
    method: 'POST',
    params,
  });
}

export async function get({ id }) {
  return request(PORTAL_PATH + '/api/qianzhuang/insurancepolicy/' + id, {});
}

// export async function getBusinessParamsByCode({ sprCode }) {
//   return request(BASEDATA_PATH + '/api/allBusinessParams', {
//     method: 'GET',
//     data: { sprCode },
//   });
// }
